Understanding Android Versions, SDKs, and API Levels
Course: Android App Development
Topic: Understanding Android Versions, SDKs, and API Levels
Course Link: Android App Development Course
Demo Registration: Register for a Course Demo
Website: JustAcademy
1. Introduction
Android application development requires an understanding of Android operating system versions, Software Development Kits (SDKs), and API levels. These concepts help developers select development tools, access platform features, maintain compatibility with different devices, and prepare applications for release.
Android runs on a wide range of smartphones, tablets, televisions, watches, and other devices. These devices may use different Android versions and support different platform APIs. Therefore, an application must be developed and tested with compatibility in mind.
For example, an application may use a feature introduced in Android 14 while also supporting devices running Android 10. The developer must ensure that the feature is used safely and that the application behaves correctly on older devices.
2. What Are Android Versions?
An Android version identifies a particular release of the Android operating system. Each major version may introduce new features, interface improvements, security updates, performance enhancements, and changes to developer APIs.
Android versions are identified by version numbers, such as Android 12, Android 13, Android 14, Android 15, and Android 16. Historically, Android releases also used dessert-themed codenames, including Oreo, Pie, and Nougat.
2.1 Why Android Versions Matter
- Feature availability: Some platform features are available only on particular Android versions or later.
- Security: New releases introduce security improvements and changes to permission handling.
- Compatibility: Developers must verify that applications work on the Android versions they intend to support.
- User experience: Interface behavior, notifications, background execution, and system settings may differ between versions.
- Maintenance: Applications may need updates to support newer operating system behavior.
2.2 Examples of Android Versions
| Android Version |
API Level |
Important Learning Point |
| Android 8.0 Oreo |
26 |
Introduced background execution limits and notification channels. |
| Android 9 Pie |
28 |
Introduced platform improvements involving adaptive battery and display cutouts. |
| Android 10 |
29 |
Introduced scoped storage changes and broader privacy improvements. |
| Android 11 |
30 |
Expanded one-time permissions and introduced additional privacy controls. |
| Android 12 |
31 |
Introduced Material You design and additional privacy features. |
| Android 12L |
32 |
Focused on improvements for large screens and foldable devices. |
| Android 13 |
33 |
Introduced notification permission requirements for many newly installed applications. |
| Android 14 |
34 |
Added further privacy, security, accessibility, and platform behavior changes. |
| Android 15 |
35 |
Introduced additional privacy, security, and user experience improvements. |
| Android 16 |
36 |
Introduced further platform updates and compatibility considerations. |
Note: This table is a learning reference, not an exhaustive release history. Android releases and their API levels are documented in the official Android API level documentation.
3. What Is an SDK?
SDK stands for Software Development Kit. It is a collection of tools, libraries, APIs, and utilities that developers use to build applications for a particular platform.
The Android SDK provides the resources required to develop, compile, test, debug, and package Android applications.
3.1 Components of the Android SDK
- SDK Platforms: Platform-specific Android APIs used to compile applications against a selected Android version.
- Build Tools: Utilities used to compile, process, and package application code and resources.
- Platform Tools: Tools such as Android Debug Bridge (ADB) for communicating with connected devices.
- Command-Line Tools: Utilities for managing SDK components and performing development tasks.
- Emulator System Images: Images used to run virtual Android devices for testing.
- Documentation and Libraries: References and supported libraries that help developers implement application features.
3.2 Why Is the Android SDK Important?
The Android SDK allows developers to access operating system functionality without implementing everything from scratch. It provides standardized interfaces for activities, services, permissions, notifications, storage, networking, and other platform capabilities.
For example, a developer creating a camera application can use Android camera APIs rather than writing a complete hardware driver. The application can focus on its own features while relying on platform-supported functionality.
4. What Is an API Level?
An API level is an integer that identifies a revision of the Android framework API. It indicates which platform programming interfaces and system behaviors are available to applications.
Each Android platform release is associated with an API level. Developers use API levels to determine whether a particular API is available and to configure application compatibility.
For example:
- Android 10 corresponds to API level 29.
- Android 11 corresponds to API level 30.
- Android 12 corresponds to API level 31.
- Android 13 corresponds to API level 33.
- Android 14 corresponds to API level 34.
- Android 15 corresponds to API level 35.
- Android 16 corresponds to API level 36.
4.1 What Does an API Level Control?
- Availability of Android framework classes and methods.
- Availability of manifest attributes and resource features.
- Platform permission behavior and system restrictions.
- Compatibility checks during application installation.
- Selection of APIs when compiling an application.
- Platform behavior changes that may depend on the application's target API level.
5. Difference Between Android Version, SDK, and API Level
| Concept |
Meaning |
Example |
| Android Version |
The release of the Android operating system. |
Android 14 |
| Android SDK |
The collection of development tools, platform libraries, and utilities. |
Android SDK installed through Android Studio |
| API Level |
The integer identifying a revision of the Android framework API. |
API level 34 for Android 14 |
| compileSdk |
The API level against which the application is compiled. |
36 |
| minSdk |
The lowest Android API level supported by the application. |
26 |
| targetSdk |
The API level whose expected platform behavior the application targets. |
36 |
These terms are related but not interchangeable. The Android version identifies the operating system release, the SDK supplies development resources, and the API level identifies the platform API revision.
6. Understanding compileSdk, minSdk, and targetSdk
Android projects commonly configure three important SDK values: compileSdk, minSdk, and targetSdk. Understanding their different purposes helps developers avoid compatibility problems.
6.1 compileSdk
compileSdk specifies the Android API level used when compiling the application. It determines which platform APIs the compiler can recognize.
A newer compile SDK can provide access to newer API definitions. However, compiling against a newer SDK does not automatically mean the application supports every device or targets the latest runtime behavior.
6.2 minSdk
minSdk specifies the minimum API level on which the application is intended to run. A device below this level generally cannot install the application through normal Android installation checks.
Choosing a lower minimum SDK can allow more older devices to install the application, but developers must ensure that the code works correctly on those devices.
6.3 targetSdk
targetSdk indicates the API level whose platform behavior the application is designed to support. Android may apply compatibility behavior based on this value, and Google Play imposes target API requirements for app submissions.
Targeting a newer API level may require developers to update permission handling, background work, notifications, or other platform-specific behavior.
6.4 Comparison Table
| Setting |
Main Purpose |
Key Question |
| compileSdk |
Controls the platform API definitions available during compilation. |
Which Android APIs can I compile against? |
| minSdk |
Defines the minimum supported Android API level. |
What is the oldest Android version my app supports? |
| targetSdk |
Declares the Android API level whose behavior the app targets. |
Which Android platform behavior has my app been prepared for? |
7. Configuring SDK Versions in an Android Project
In modern Android projects, SDK values are commonly configured in the module-level Gradle build file. The following example uses Kotlin DSL.
android {
namespace = "com.example.myapp"
compileSdk = 36
defaultConfig {
applicationId = "com.example.myapp"
minSdk = 26
targetSdk = 36
versionCode = 1
versionName = "1.0"
}
}
Explanation:
namespace identifies the namespace used for generated application classes.
compileSdk = 36 compiles the application against API level 36.
minSdk = 26 sets API level 26 as the minimum supported level in this example.
targetSdk = 36 declares API level 36 as the target.
versionCode is an integer used for application version ordering.
versionName is the user-visible version label.
These values are examples, not universal recommendations. Choose compatible SDK values according to your project requirements, installed development tools, supported devices, and current distribution policies.
8. Checking SDK Values in Android Studio
Android Studio provides a convenient way to inspect and update SDK settings.
- Open the Android project in Android Studio.
- Locate the module-level
build.gradle.kts or build.gradle file.
- Find the
android configuration block.
- Review the
compileSdk, minSdk, and targetSdk values.
- Open SDK Manager to inspect installed Android SDK platforms and build tools.
- Install the platform components required by the project if they are missing.
- Sync the project with Gradle and resolve any compatibility or dependency errors.
- Build and test the application on appropriate emulator images or physical devices.
9. Checking the Android Version on a Device
Before testing an application, developers should identify the Android version running on the test device.
Method 1: Device Settings
- Open Settings on the Android device.
- Navigate to About phone or About device.
- Locate the Android version information.
- Check the build information if additional technical details are required.
The exact menu names may vary between manufacturers.
Method 2: Using ADB
When Android Debug Bridge is available and the device is connected with debugging enabled, run:
adb shell getprop ro.build.version.release
adb shell getprop ro.build.version.sdk
The first command displays the Android release version, while the second returns the device's API level.
10. Using API Levels in Kotlin
Android applications can inspect the API level at runtime to determine whether a platform-specific feature is available.
import android.os.Build
import android.util.Log
fun checkAndroidVersion() {
val apiLevel = Build.VERSION.SDK_INT
if (apiLevel >= Build.VERSION_CODES.TIRAMISU) {
Log.d("AndroidVersion", "Android 13 or newer")
} else {
Log.d("AndroidVersion", "Older than Android 13")
}
}
Explanation
Build.VERSION.SDK_INT returns the device's platform API level.
Build.VERSION_CODES.TIRAMISU represents API level 33, corresponding to Android 13.
- The condition checks whether the device runs API level 33 or later.
- The code can be used to select an appropriate implementation for different platform versions.
Use runtime checks only where needed. Prefer compatibility libraries and version-independent APIs when they provide the required behavior.
11. Handling APIs That Are Not Available on Older Android Versions
A common compatibility problem occurs when an application calls an API that does not exist on the device's Android version. This can cause runtime errors if the code is not guarded properly.
For example, suppose a feature requires API level 33 or later. The application can check the current API level before calling the feature-specific code.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
// Call an API that requires Android 13 or later.
} else {
// Use a compatible alternative or disable the feature.
}
When implementing this pattern, make sure the newer API is actually available at the checked API level and provide an appropriate fallback for older devices.
12. Android SDK Manager
The SDK Manager is a tool in Android Studio used to install, update, and manage Android development components.
Common SDK Manager Components
- SDK Platforms: Android platform packages for specific API levels.
- SDK Build-Tools: Utilities required to build and package applications.
- SDK Platform-Tools: Tools such as ADB and Fastboot.
- Command-Line Tools: Utilities for SDK maintenance and command-line development.
- Emulator: Software for running virtual Android devices.
- System Images: Android images used by configured emulators.
Why Keep SDK Components Updated?
- To obtain supported development tools and platform updates.
- To test applications against additional Android versions.
- To address build-tool issues and development environment problems.
- To prepare applications for newer platform requirements.
Before upgrading a production project, review release notes, check plugin compatibility, and test the build instead of changing every dependency without verification.
13. Android Compatibility and Backward Compatibility
Backward compatibility means allowing an application to continue working on older supported platform versions while using newer platform capabilities where available.
Android developers often maintain compatibility by setting a suitable minimum SDK, using compatibility libraries, checking API availability, and testing different system versions.
Example
Suppose an application supports API level 26 and uses a feature introduced at API level 33. The application can still support older devices if the feature is guarded and an appropriate alternative is provided where necessary.
Important Compatibility Practices
- Set a realistic minimum SDK based on the application's audience and features.
- Check the API documentation before using newer framework methods.
- Use AndroidX and appropriate compatibility libraries when helpful.
- Test the minimum supported version and newer versions.
- Review changes to permissions, storage, notifications, and background execution.
- Provide graceful fallbacks when a feature is unavailable.
14. Understanding Target API Requirements for Google Play
Google Play sets target API level requirements for applications submitted to its store. These requirements change over time and can differ by device category and application type.
As of October 28, 2026, Google Play's published requirements state that new apps and app updates generally must target Android 16 (API level 36) or higher from August 31, 2026, subject to the published exceptions and extension provisions. Developers should verify the latest requirements before submitting an app.
Targeting a recent API level is not the same as setting the minimum supported Android version. An application can target a recent API level while supporting older devices through a lower minimum SDK, provided its implementation remains compatible.
Official reference: Google Play target API level requirements.
15. Common SDK and API Level Errors
| Problem |
Possible Cause |
Solution |
| Unresolved Android API reference |
The selected compile SDK does not include the API. |
Check the API's introduction level and update the compile SDK when appropriate. |
| Application cannot install on an older device |
The device API level is lower than the app's minimum SDK. |
Review the minimum SDK and determine whether older-device support is feasible. |
| Runtime crash on an older device |
The code calls an unavailable API. |
Add appropriate API checks or use a compatible implementation. |
| Unexpected behavior on a newer Android version |
Platform behavior changes or compatibility requirements. |
Review Android behavior-change documentation and test the application. |
| Gradle sync failure |
Incompatible Gradle, Android Gradle Plugin, JDK, or SDK configuration. |
Check the compatibility requirements for the installed tool versions. |
| Google Play rejects a release |
The target API level or another store requirement is not satisfied. |
Review the current Play Console policy and update the project as required. |
16. Best Practices for Managing Android SDK Versions
- Use a supported compile SDK and review Android platform release notes.
- Choose the minimum SDK based on actual feature requirements and intended device coverage.
- Keep the target SDK aligned with current platform and store requirements.
- Review runtime permissions and behavior changes when increasing the target SDK.
- Test on the minimum supported API level and representative newer versions.
- Use runtime API checks for features that are not available on all supported devices.
- Maintain compatible versions of Gradle, the Android Gradle Plugin, and the JDK.
- Keep project dependencies maintained and avoid unnecessary SDK components.
- Use version control before making significant build configuration changes.
- Consult official Android documentation when selecting or upgrading API levels.
17. Practical Exercise: Configure SDK Levels
Create a simple Android application and practice configuring its SDK values.
Exercise Tasks
- Create a new Android project in Android Studio.
- Review the module-level Gradle configuration.
- Identify the current compile SDK, minimum SDK, and target SDK.
- Read the official documentation for the APIs used by your application.
- Display the device's API level in a TextView or Compose Text component.
- Add a conditional branch for a feature that requires a newer Android API.
- Run the application on two emulator images with different API levels.
- Record any differences in functionality or permission behavior.
Expected Learning Outcomes
- Understand the difference between Android versions and API levels.
- Recognize the roles of compileSdk, minSdk, and targetSdk.
- Configure SDK values in a Gradle project.
- Check the Android version at runtime.
- Identify and resolve basic compatibility issues.
18. Interview Questions and Answers
Q1. What is an Android version?
Answer: An Android version identifies a release of the Android operating system, such as Android 13, Android 14, or Android 15.
Q2. What is an Android SDK?
Answer: The Android SDK is a collection of platform libraries, development tools, build utilities, and testing resources used to create Android applications.
Q3. What is an API level?
Answer: An API level is an integer that identifies a revision of the Android framework API.
Q4. What is the difference between compileSdk and minSdk?
Answer: compileSdk controls the platform APIs available during compilation, while minSdk defines the minimum Android API level supported by the application.
Q5. What is targetSdk?
Answer: targetSdk declares the API level whose platform behavior the application is designed to support. It also affects compatibility behavior and is relevant to Google Play submission requirements.
Q6. Can an application target Android 16 and support Android 10?
Answer: Yes, if its minimum SDK permits Android 10 and the code is compatible with that version. APIs introduced after Android 10 must be handled appropriately.
Q7. How can you check a device's API level in Kotlin?
Answer: Use Build.VERSION.SDK_INT to retrieve the integer API level at runtime.
Q8. What happens if an application uses an unavailable API?
Answer: Calling a framework API that does not exist on the device can cause a runtime error. Developers should check API availability or use a compatible alternative.
Q9. What is SDK Manager?
Answer: SDK Manager is an Android Studio tool used to install and manage Android SDK platforms, build tools, platform tools, and other development components.
Q10. Why should developers test different Android versions?
Answer: Different versions can have different APIs, permissions, and system behavior. Testing helps identify compatibility issues and ensures the application works on supported devices.
19. Quick Revision Checklist
- Understand Android version numbers and their purpose.
- Define the Android SDK and identify its main components.
- Explain what an API level represents.
- Differentiate compileSdk, minSdk, and targetSdk.
- Configure SDK values in a Gradle build file.
- Check device API levels using Settings or ADB.
- Use Kotlin runtime checks for newer APIs.
- Understand backward compatibility and feature fallbacks.
- Use SDK Manager to install the required components.
- Review current Google Play target API requirements before release.
20. Conclusion
Understanding Android versions, SDKs, and API levels is essential for building reliable Android applications. Android versions identify operating system releases, the SDK supplies development tools and platform libraries, and API levels identify the framework APIs available on each platform release.
By configuring compileSdk, minSdk, and targetSdk correctly, checking API availability, and testing across supported devices, developers can create applications that take advantage of modern Android features while maintaining compatibility with their intended users.
Learn More with JustAcademy
Continue learning about Android development through these resources:
Explore the Android App Development Course
Register for a Course Demo
Visit the JustAcademy Website